public class Tv {

	String modelNo;
	String tvType;
	String color;
	int size;
	boolean dvr;
	boolean hasStarted = false;
	int changeChannel;

	// method 1- Starting the Tv
	void start() {
		if (hasStarted = true) {
			System.out.println(" Tv has started.");
		} else {
			System.out.println("Tv has not started.");
		}
	}

	// method 2: Switch Case: taking channel no and Tv Input from the caller and
	// returning channel Name.
	String changeChannel(int channelNo, String input) {
		String channelName = "We dont provide this channel";
		if (input.equals("Input 1")) {
			switch (channelNo) {
			case 1:
				channelName = "FOX";
				break;
			case 2:
				channelName = "NBC";
				break;
			case 3:
				channelName = "NICK";
				break;
			case 4:
				channelName = "DISNEY";
				break;

			default:
				channelName = "Invalid Channel";
			}
		}

		else

		{
			System.out.println("please select input 1");
		}

		return channelName;
	}

	/*
	 * If tv is on and channel = 2 or 3 record program. if the
	 * channel is other than 2,3 then record the program.
	 */
	void recProgram(String tvStatus, int channel)

	{
		if (tvStatus.equals("ON")) {

			if ((channel == 2) || (channel == 3))

			{

				System.out.println("Please Record the program, Channe No is : "
						+ channel);
			}

			else

			{

				System.out.println("Don't Record the program,Channel No is :"
						+ channel);
			}

		}

	}

}
